package com.example.administrator.newxlmedical;

import android.graphics.drawable.AnimationDrawable;
import android.os.Bundle;
import android.os.Message;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.widget.ImageView;

import com.example.administrator.baseproject.BaseActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import constants.HandlerConstant;
import utils.ActivityControl;
import utils.ActivityUtil;

public class LodingActivity extends BaseActivity {

    @BindView(R.id.loading)
    ImageView mImageView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_loding);
        ButterKnife.bind(this);
        ActivityControl.addActivity(this);
        mImageView.setBackgroundResource(R.drawable.loading);
        AnimationDrawable animationDrawable = (AnimationDrawable) mImageView.getBackground();
        animationDrawable.start();
    }

    @Override
    protected void onHandleMessage(Message msg) {
        super.onHandleMessage(msg);

        switch (msg.what){

            case HandlerConstant.CLOSE:
                finish();
                break;
        }
    }
}
